
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>

using namespace std;

class Solution {
public:
    int waysToStep(int n) {
        long dp[1000000];
        dp[0] = 1;
        dp[1] = 1;
        dp[2] = 2;

        for (int i = 3; i <= n; ++i)
            dp[i] = (dp[i - 1] + dp[i - 2] + dp[i - 3]) % 1000000007;

        return dp[n];
    }
};

int main()
{

	return 0;
}